import request from '@/utils/request'

/**
 * 查询订单
 */
export function getList(query) {
  return request({
    url: '/order/list',
    method: 'get',
    params: query
  })
}

/**
 * 查询签到订单
 */
export function listHistorySign(query) {
  return request({
    url: '/order/listHistorySign',
    method: 'get',
    params: query
  })
}

export function listNeedSign(storeId, storeName) {
  return request({
    url: '/order/listNeedSign',
    method: 'get',
    params: { storeId, storeName }
  })
}

/**
 * 单个签收
 * @param orderId 子订单ID
 */
export function signinOne(orderId) {
  return request.post('/order/signin/one', { orderId })
}

/**
 * 批量签收
 * @param ids 待签收ID集合
 * @param time 签收时间（可定时签收）
 */
export function signinList(ids, time) {
  return request.post('/order/signin/list', { ids, time })
}

